<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div class="card">
      <img class="face" src="../img/1.jpeg" alt="" srcset="" />
      <div class="back">
        <span>测试1</span>
      </div>
    </div>
  </body>
  <style>
    .card {
      position: relative;
      width: 100px;
      height: 100px;
      perspective: 500px;
    }
    .face {
      position: absolute;
      top: 0;
      width: 100px;
      height: 100px;
      transition: 0.5s;
      backface-visibility: hidden;
    }
    .back {
      position: absolute;
      top: 0;
      width: 100px;
      height: 100px;
      display: flex;
      justify-content: center;
      align-items: center;
      color: rgba(0, 0, 0, 1);
      background-color: rgba(0, 0, 0, 0.1);
      transition: 0.5s;
    }
    .card:hover .face {
      transform: rotateY(-180deg);
    }
    .back {
      backface-visibility: hidden;
      transform: rotateY(180deg);
      transition: 0.5s;
    }
    .card:hover .back {
      transform: rotateY(0);
    }
  </style>
</html>
